<?php
/**
 * form_items_config中input type为dynamic_select的函数控制器
 */
class Admindynamic_model extends Base_Model
{
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 获取问答社区话题
     */
    public function getSubOptions()
    {
        $CI = &get_instance();
        $CI->load->database();
        return $CI->db->get_where('comm_subject')->result_array();
    }
    /**
     * 获取前台用户权限
     */
    public function getPrivOptions()
    {
        $CI = &get_instance();
        $CI->load->database();
        return $CI->db->get_where('mod_privillege')->result_array();
    }
    /**
     * 获取前台用户权限组
     */
    public function getPrivGroupOptions()
    {
        $CI = &get_instance();
        $CI->load->database();
        return $CI->db->get_where('mod_privillege_group')->result_array();
    }

    public function getKdtsalesmantypeOptions()
    {
        $CI = &get_instance();
        $CI->load->database();
        return $CI->db->get_where('mod_salesman_type')->result_array();
    }

    public function getWenjuanGroup()
    {
        $CI = &get_instance();
        $CI->load->database();
        return $CI->db->get_where('wenjuan_group','status = 1')->result_array();
    }

    public function getWenjuan()
    {
        $CI = &get_instance();
        $CI->load->database();
        return $CI->db->from('wenjuan')->order_by('id','DESC')->get()->result_array();
    }

    public function getKdtslspostLink()
    {
        $CI = &get_instance();
        $CI->load->database();
        return $CI->db->from('mod_slspost_route')->order_by('sort','ASC')->get()->result_array();
    }

    public function getKdtslspostType()
    {
        $CI = &get_instance();
        $CI->load->database();
        return $CI->db->get_where('mod_slspost_type','status = 1')->result_array();
    }

    public function getQfinfoList()
    {
        $CI = &get_instance();
        $CI->load->database();
        return $CI->db->from('mod_qf_info')->get()->result_array();
    }
}